function userInBuild(){
  var ie6 = ($.browser.msie && $.browser.version == '6.0') ? 90 : 0;

  var downLists = $('#menuList > ul');
  downLists.hover(function(){
    window.__ishover = true;
  },function(){
    jQuery.fx.off = window.__ishover = false;
    downLists.hide();    
  }).find('a').click(function(){
    if(ie6 > 0) return true;
    var hash = document.getElementsByName(this.hash.replace('#',''))[0];
    if(hash) window.scrollTo(0,$(hash.parentNode).offset().top - 213);
    return false;
  });
    
  $('#topTabs a').hover(function(){
    window.__ishover = true;
    $('#menuList ul').hide();
    downList = $('#childId'+$(this).parent()[0].tabIndex);    
    var offset = $(this).position();     
    downList.css('top',offset.top + 25 + ie6);    
    downList.css('left',offset.left);  
    downList.show();    
  },function(){    
    setTimeout(function(){if(!window.__ishover) downLists.hide();},1500); 
  });
   
  $('#sb_form_q')[0].onkeyup = function () {
    var v = this.value;    
    v = v.replace(/([\\\(\)\[\]\+\*\^\$\?\.])/ig,'\\$1');        
    var rows = empList[0].rows || [],len = rows.length;
    if(len == undefined) {rows = [rows];len = 1;}
    if(v == '') $('#menuList').show();
    else $('#menuList').hide();
    
    var reg = new RegExp(v, "ig");    
    for (var i = 0; i < len; i++) {
      var r = rows[i];      
      r.style.display = (v == '' || ((r.innerText || r.textContent).replace(/\s/g,"").search(reg) > -1))? '' : 'none';
    }
  };
    
  window.empList = $('#empList');
  if ($.browser.msie) empList.find('TD:nth-child(2)').css('text-align','left');
  if(ie6 > 0)  {
    empList.find('TD[colspan="9"][align]').css({'background-color': '#019271','color': '#FFFFFF','text-align': 'center', 'font-weight': 'bold'});
    //$('br').remove();
  }

  if(ie6 > 0) $('#clearDivID').hide();
}

$(userInBuild);


